package com.yxtp.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.yxtp.dao.UserMapper;
import com.yxtp.entity.User;
import com.yxtp.service.UserService;

@Service
@Transactional
public class UserServiceImpl implements UserService{

	@Autowired
	private UserMapper usermapper;
	
	//查询用户
	@Override
	public User selectUserByUsernameAndPwd(String username, String password) {
		// TODO Auto-generated method stub
		return this.usermapper.selectUserByUsernameAndPwd(username, password);
	}

	@Override
	public void addUser(User user) {
		// TODO Auto-generated method stub
		this.usermapper.addUser(user);
	}

	@Override
	public String selectByUsername(String username) {
		return this.usermapper.selectByUsername(username);
	}

}
